<template>
  <div>
    <div v-for="(item) in list" :key="item.id" class="list">
      <div>{{ item.name }}</div>
      <input v-model.number="item.inputText" type="text" placeholder="请输入投注金额">
      <div @click="btn(item)">
        按钮
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: []
    }
  },
  mounted () {
    const obj = [
      {
        id: 112233,
        name: '第一',
        text: ''
      },
      {
        id: 1569233,
        name: '二位',
        text: ''
      }
    ]
    for (let i = 0; i < obj.length; i++) {
      const ele = obj[i] // current obj
      const key = 'inputText'
      const value = ''
      ele[key] = value
    }
    this.list = obj
    console.log(obj, '-----')
  },
  methods: {
    btn (item) {
      console.log(item)
    }
  }
}
</script>

<style  lang="scss" scoped>
.list{
  margin: 20px auto;
}
</style>
